package com.concurrent.chapter1.concurrent01;

public class Main {
	public static void main(String[] args) throws InterruptedException {
		Service service = new Service();
		/*
		ThreadA a = new ThreadA(service);
		a.setName("A");
		ThreadB b = new ThreadB(service);
		b.setName("B");
		ThreadC c = new ThreadC(service);
		c.setName("C");
		a.start();
		b.start();
		c.start();
		*/
		ThreadA[] a = new ThreadA[10];
		for (int i = 0; i < a.length; i++) {
			a[i] = new ThreadA(service);
			a[i].start();
			Thread.sleep(100);
		}
	}
}
